home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / htmlparser / nsIExpatSink.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  12KB  |  245 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIExpatSink.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIExpatSink_h__
  6. #define __gen_nsIExpatSink_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsIExpatSink */
  19. #define NS_IEXPATSINK_IID_STR "1deea160-c661-11d5-84cc-0010a4e0c706"
  20.  
  21. #define NS_IEXPATSINK_IID \
  22.   {0x1deea160, 0xc661, 0x11d5, \
  23.     { 0x84, 0xcc, 0x00, 0x10, 0xa4, 0xe0, 0xc7, 0x06 }}
  24.  
  25. /**
  26.  * This interface should be implemented by any content sink that wants
  27.  * to get output from expat and do something with it; in other words,
  28.  * by any sink that handles some sort of XML dialect.
  29.  */
  30. class NS_NO_VTABLE nsIExpatSink : public nsISupports {
  31.  public: 
  32.  
  33.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IEXPATSINK_IID)
  34.  
  35.   /**
  36.    * Called to handle the opening tag of an element.
  37.    * @param aName the fully qualified tagname of the element
  38.    * @param aAtts the array of attribute names and values.  There are
  39.    *        aAttsCount/2 names and aAttsCount/2 values, so the total number of
  40.    *        elements in the array is aAttsCount.  The names and values
  41.    *        alternate.  Thus, if we number attributes starting with 0,
  42.    *        aAtts[2*k] is the name of the k-th attribute and aAtts[2*k+1] is
  43.    *        the value of that attribute  Both explicitly specified attributes
  44.    *        and attributes that are defined to have default values in a DTD are
  45.    *        present in aAtts.
  46.    * @param aAttsCount the number of elements in aAtts.
  47.    * @param aIndex If the element has an attribute of type ID, then
  48.    *        aAtts[aIndex] is the name of that attribute.  Otherwise, aIndex
  49.    *        is -1
  50.    * @param aLineNumber the line number of the start tag in the data stream.
  51.    */
  52.   /* void HandleStartElement (in wstring aName, [array, size_is (aAttsCount)] in wstring aAtts, in unsigned long aAttsCount, in long aIndex, in unsigned long aLineNumber); */
  53.   NS_IMETHOD HandleStartElement(const PRUnichar *aName, const PRUnichar **aAtts, PRUint32 aAttsCount, PRInt32 aIndex, PRUint32 aLineNumber) = 0;
  54.  
  55.   /**
  56.    * Called to handle the closing tag of an element.
  57.    * @param aName the fully qualified tagname of the element
  58.    */
  59.   /* void HandleEndElement (in wstring aName); */
  60.   NS_IMETHOD HandleEndElement(const PRUnichar *aName) = 0;
  61.  
  62.   /**
  63.    * Called to handle a comment
  64.    * @param aCommentText the text of the comment (not including the
  65.    *        "<!--" and "-->")
  66.    */
  67.   /* void HandleComment (in wstring aCommentText); */
  68.   NS_IMETHOD HandleComment(const PRUnichar *aCommentText) = 0;
  69.  
  70.   /**
  71.    * Called to handle a CDATA section
  72.    * @param aData the text in the CDATA section.  This is null-terminated.
  73.    * @param aLength the length of the aData string
  74.    */
  75.   /* void HandleCDataSection ([size_is (aLength)] in wstring aData, in unsigned long aLength); */
  76.   NS_IMETHOD HandleCDataSection(const PRUnichar *aData, PRUint32 aLength) = 0;
  77.  
  78.   /**
  79.    * Called to handle the doctype declaration
  80.    */
  81.   /* void HandleDoctypeDecl (in AString aSubset, in AString aName, in AString aSystemId, in AString aPublicId, in nsISupports aCatalogData); */
  82.   NS_IMETHOD HandleDoctypeDecl(const nsAString & aSubset, const nsAString & aName, const nsAString & aSystemId, const nsAString & aPublicId, nsISupports *aCatalogData) = 0;
  83.  
  84.   /**
  85.    * Called to handle character data.  Note that this does NOT get
  86.    * called for the contents of CDATA sections.
  87.    * @param aData the data to handle.  aData is NOT NULL-TERMINATED.
  88.    * @param aLength the length of the aData string
  89.    */
  90.   /* void HandleCharacterData ([size_is (aLength)] in wstring aData, in unsigned long aLength); */
  91.   NS_IMETHOD HandleCharacterData(const PRUnichar *aData, PRUint32 aLength) = 0;
  92.  
  93.   /**
  94.    * Called to handle a processing instruction
  95.    * @param aTarget the PI target (e.g. xml-stylesheet)
  96.    * @param aData all the rest of the data in the PI
  97.    */
  98.   /* void HandleProcessingInstruction (in wstring aTarget, in wstring aData); */
  99.   NS_IMETHOD HandleProcessingInstruction(const PRUnichar *aTarget, const PRUnichar *aData) = 0;
  100.  
  101.   /**
  102.    * Handle the XML Declaration.
  103.    *
  104.    * @param aVersion    The version string, can be null if not specified.
  105.    * @param aEncoding   The encoding string, can be null if not specified.
  106.    * @param aStandalone -1, 0, or 1 indicating respectively that there was no
  107.    *                    standalone parameter in the declaration, that it was
  108.    *                    given as no, or that it was given as yes.
  109.    */
  110.   /* void HandleXMLDeclaration (in wstring aVersion, in wstring aEncoding, in long aStandalone); */
  111.   NS_IMETHOD HandleXMLDeclaration(const PRUnichar *aVersion, const PRUnichar *aEncoding, PRInt32 aStandalone) = 0;
  112.  
  113.   /* void ReportError (in wstring aErrorText, in wstring aSourceText); */
  114.   NS_IMETHOD ReportError(const PRUnichar *aErrorText, const PRUnichar *aSourceText) = 0;
  115.  
  116. };
  117.  
  118. /* Use this macro when declaring classes that implement this interface. */
  119. #define NS_DECL_NSIEXPATSINK \
  120.   NS_IMETHOD HandleStartElement(const PRUnichar *aName, const PRUnichar **aAtts, PRUint32 aAttsCount, PRInt32 aIndex, PRUint32 aLineNumber); \
  121.   NS_IMETHOD HandleEndElement(const PRUnichar *aName); \
  122.   NS_IMETHOD HandleComment(const PRUnichar *aCommentText); \
  123.   NS_IMETHOD HandleCDataSection(const PRUnichar *aData, PRUint32 aLength); \
  124.   NS_IMETHOD HandleDoctypeDecl(const nsAString & aSubset, const nsAString & aName, const nsAString & aSystemId, const nsAString & aPublicId, nsISupports *aCatalogData); \
  125.   NS_IMETHOD HandleCharacterData(const PRUnichar *aData, PRUint32 aLength); \
  126.   NS_IMETHOD HandleProcessingInstruction(const PRUnichar *aTarget, const PRUnichar *aData); \
  127.   NS_IMETHOD HandleXMLDeclaration(const PRUnichar *aVersion, const PRUnichar *aEncoding, PRInt32 aStandalone); \
  128.   NS_IMETHOD ReportError(const PRUnichar *aErrorText, const PRUnichar *aSourceText); 
  129.  
  130. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  131. #define NS_FORWARD_NSIEXPATSINK(_to) \
  132.   NS_IMETHOD HandleStartElement(const PRUnichar *aName, const PRUnichar **aAtts, PRUint32 aAttsCount, PRInt32 aIndex, PRUint32 aLineNumber) { return _to HandleStartElement(aName, aAtts, aAttsCount, aIndex, aLineNumber); } \
  133.   NS_IMETHOD HandleEndElement(const PRUnichar *aName) { return _to HandleEndElement(aName); } \
  134.   NS_IMETHOD HandleComment(const PRUnichar *aCommentText) { return _to HandleComment(aCommentText); } \
  135.   NS_IMETHOD HandleCDataSection(const PRUnichar *aData, PRUint32 aLength) { return _to HandleCDataSection(aData, aLength); } \
  136.   NS_IMETHOD HandleDoctypeDecl(const nsAString & aSubset, const nsAString & aName, const nsAString & aSystemId, const nsAString & aPublicId, nsISupports *aCatalogData) { return _to HandleDoctypeDecl(aSubset, aName, aSystemId, aPublicId, aCatalogData); } \
  137.   NS_IMETHOD HandleCharacterData(const PRUnichar *aData, PRUint32 aLength) { return _to HandleCharacterData(aData, aLength); } \
  138.   NS_IMETHOD HandleProcessingInstruction(const PRUnichar *aTarget, const PRUnichar *aData) { return _to HandleProcessingInstruction(aTarget, aData); } \
  139.   NS_IMETHOD HandleXMLDeclaration(const PRUnichar *aVersion, const PRUnichar *aEncoding, PRInt32 aStandalone) { return _to HandleXMLDeclaration(aVersion, aEncoding, aStandalone); } \
  140.   NS_IMETHOD ReportError(const PRUnichar *aErrorText, const PRUnichar *aSourceText) { return _to ReportError(aErrorText, aSourceText); } 
  141.  
  142. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  143. #define NS_FORWARD_SAFE_NSIEXPATSINK(_to) \
  144.   NS_IMETHOD HandleStartElement(const PRUnichar *aName, const PRUnichar **aAtts, PRUint32 aAttsCount, PRInt32 aIndex, PRUint32 aLineNumber) { return !_to ? NS_ERROR_NULL_POINTER : _to->HandleStartElement(aName, aAtts, aAttsCount, aIndex, aLineNumber); } \
  145.   NS_IMETHOD HandleEndElement(const PRUnichar *aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->HandleEndElement(aName); } \
  146.   NS_IMETHOD HandleComment(const PRUnichar *aCommentText) { return !_to ? NS_ERROR_NULL_POINTER : _to->HandleComment(aCommentText); } \
  147.   NS_IMETHOD HandleCDataSection(const PRUnichar *aData, PRUint32 aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->HandleCDataSection(aData, aLength); } \
  148.   NS_IMETHOD HandleDoctypeDecl(const nsAString & aSubset, const nsAString & aName, const nsAString & aSystemId, const nsAString & aPublicId, nsISupports *aCatalogData) { return !_to ? NS_ERROR_NULL_POINTER : _to->HandleDoctypeDecl(aSubset, aName, aSystemId, aPublicId, aCatalogData); } \
  149.   NS_IMETHOD HandleCharacterData(const PRUnichar *aData, PRUint32 aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->HandleCharacterData(aData, aLength); } \
  150.   NS_IMETHOD HandleProcessingInstruction(const PRUnichar *aTarget, const PRUnichar *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->HandleProcessingInstruction(aTarget, aData); } \
  151.   NS_IMETHOD HandleXMLDeclaration(const PRUnichar *aVersion, const PRUnichar *aEncoding, PRInt32 aStandalone) { return !_to ? NS_ERROR_NULL_POINTER : _to->HandleXMLDeclaration(aVersion, aEncoding, aStandalone); } \
  152.   NS_IMETHOD ReportError(const PRUnichar *aErrorText, const PRUnichar *aSourceText) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReportError(aErrorText, aSourceText); } 
  153.  
  154. #if 0
  155. /* Use the code below as a template for the implementation class for this interface. */
  156.  
  157. /* Header file */
  158. class nsExpatSink : public nsIExpatSink
  159. {
  160. public:
  161.   NS_DECL_ISUPPORTS
  162.   NS_DECL_NSIEXPATSINK
  163.  
  164.   nsExpatSink();
  165.  
  166. private:
  167.   ~nsExpatSink();
  168.  
  169. protected:
  170.   /* additional members */
  171. };
  172.  
  173. /* Implementation file */
  174. NS_IMPL_ISUPPORTS1(nsExpatSink, nsIExpatSink)
  175.  
  176. nsExpatSink::nsExpatSink()
  177. {
  178.   /* member initializers and constructor code */
  179. }
  180.  
  181. nsExpatSink::~nsExpatSink()
  182. {
  183.   /* destructor code */
  184. }
  185.  
  186. /* void HandleStartElement (in wstring aName, [array, size_is (aAttsCount)] in wstring aAtts, in unsigned long aAttsCount, in long aIndex, in unsigned long aLineNumber); */
  187. NS_IMETHODIMP nsExpatSink::HandleStartElement(const PRUnichar *aName, const PRUnichar **aAtts, PRUint32 aAttsCount, PRInt32 aIndex, PRUint32 aLineNumber)
  188. {
  189.     return NS_ERROR_NOT_IMPLEMENTED;
  190. }
  191.  
  192. /* void HandleEndElement (in wstring aName); */
  193. NS_IMETHODIMP nsExpatSink::HandleEndElement(const PRUnichar *aName)
  194. {
  195.     return NS_ERROR_NOT_IMPLEMENTED;
  196. }
  197.  
  198. /* void HandleComment (in wstring aCommentText); */
  199. NS_IMETHODIMP nsExpatSink::HandleComment(const PRUnichar *aCommentText)
  200. {
  201.     return NS_ERROR_NOT_IMPLEMENTED;
  202. }
  203.  
  204. /* void HandleCDataSection ([size_is (aLength)] in wstring aData, in unsigned long aLength); */
  205. NS_IMETHODIMP nsExpatSink::HandleCDataSection(const PRUnichar *aData, PRUint32 aLength)
  206. {
  207.     return NS_ERROR_NOT_IMPLEMENTED;
  208. }
  209.  
  210. /* void HandleDoctypeDecl (in AString aSubset, in AString aName, in AString aSystemId, in AString aPublicId, in nsISupports aCatalogData); */
  211. NS_IMETHODIMP nsExpatSink::HandleDoctypeDecl(const nsAString & aSubset, const nsAString & aName, const nsAString & aSystemId, const nsAString & aPublicId, nsISupports *aCatalogData)
  212. {
  213.     return NS_ERROR_NOT_IMPLEMENTED;
  214. }
  215.  
  216. /* void HandleCharacterData ([size_is (aLength)] in wstring aData, in unsigned long aLength); */
  217. NS_IMETHODIMP nsExpatSink::HandleCharacterData(const PRUnichar *aData, PRUint32 aLength)
  218. {
  219.     return NS_ERROR_NOT_IMPLEMENTED;
  220. }
  221.  
  222. /* void HandleProcessingInstruction (in wstring aTarget, in wstring aData); */
  223. NS_IMETHODIMP nsExpatSink::HandleProcessingInstruction(const PRUnichar *aTarget, const PRUnichar *aData)
  224. {
  225.     return NS_ERROR_NOT_IMPLEMENTED;
  226. }
  227.  
  228. /* void HandleXMLDeclaration (in wstring aVersion, in wstring aEncoding, in long aStandalone); */
  229. NS_IMETHODIMP nsExpatSink::HandleXMLDeclaration(const PRUnichar *aVersion, const PRUnichar *aEncoding, PRInt32 aStandalone)
  230. {
  231.     return NS_ERROR_NOT_IMPLEMENTED;
  232. }
  233.  
  234. /* void ReportError (in wstring aErrorText, in wstring aSourceText); */
  235. NS_IMETHODIMP nsExpatSink::ReportError(const PRUnichar *aErrorText, const PRUnichar *aSourceText)
  236. {
  237.     return NS_ERROR_NOT_IMPLEMENTED;
  238. }
  239.  
  240. /* End of implementation class template. */
  241. #endif
  242.  
  243.  
  244. #endif /* __gen_nsIExpatSink_h__ */
  245.